home *** CD-ROM | disk | FTP | other *** search
- /*
- *--- PTextBlock.cpp ------------------------------------------------------
- * Copyright (c) 1995-96 Adobe Systems Incorporated. All rights reserved.
- * Created on Sun, Oct 22, 1995 @ 4:49 PM by Paul Ferguson.
- *
- * Description: For notes about this class, refer to the
- * PCL documentation file PTextBlock.html
- *-------------------------------------------------------------------------
- */
- #include "stdlib.h"
-
- #include "PTextBlock.h"
- #include "PReplyBuf.h"
-
- const size_t BLOCK_SIZE = 20; // two shorts, four longs
-
-
- PTextBlock::PTextBlock()
- : PListQuery()
- {
-
- }
-
- const char * PTextBlock::End()
- {
- const char * ch = itemsStart;
-
- ch += listMom.Count() * BLOCK_SIZE;
-
- return ch;
- }
-
- void PTextBlock::Scan()
- {
- PReplyBuf reply(listMom.Current());
-
- reply >> nPageNumber
- >> xLeftTop
- >> yLeftTop
- >> xRightBottom
- >> yRightBottom
- >> nNumChars;
-
- listMom.Update(reply);
- }
-
-
- PTextBlock& PTextBlock::operator=(const char * ch)
- {
- listMom = ch;
- itemsStart = ch;
- itemsStart += 2;
-
- Scan();
- return *this;
- }
-
- // end of PTextBlock.cpp
-